<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/amazeui.min.css" />
		<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/hy.admin.css" />
	</head>

	<body>
		<div class="am-g">
			<br>
			<div class="am-u-md-8 am-u-end">
				<form class="am-form am-form-horizontal">
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">{$_L.DOMAIN}</label>
						<div class="am-u-sm-9">
							<input type="text" name="domain" value="{$setting['domain']}" placeholder="{$_L.DOMAIN}">
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">{$_L.SITE_NAME}</label>
						<div class="am-u-sm-9">
							<input type="text" name="site_name" value="{$setting['site_name']}" placeholder="{$_L.SITE_NAME}">
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">{$_L.SITE_KEYWORD}</label>
						<div class="am-u-sm-9">
							<input type="text" name="site_keyword" value="{$setting['site_keyword']}" placeholder="{$_L.SITE_KEYWORD}">
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">{$_L.SITE_ABS}</label>
						<div class="am-u-sm-9">
							<input type="text" name="site_abs" value="{$setting['site_abs']}" placeholder="{$_L.SITE_ABS}">
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">{$_L.COPYRIGHT}</label>
						<div class="am-u-sm-9">
							<input type="text" name="copyright" value="{$setting['copyright']}" placeholder="{$_L.COPYRIGHT}">
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">{$_L.ICP}</label>
						<div class="am-u-sm-9">
							<input type="text" name="icp" value="{$setting['icp']}" placeholder="{$_L.ICP}">
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-intro" class="am-u-sm-3 am-form-label">{$_L.SITE_DES}</label>
						<div class="am-u-sm-9">
							<textarea class="" rows="5" name="site_des" placeholder="{$_L.SITE_DES}">{$setting['site_des']}</textarea>
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">{$_L.SITE_LOGO}</label>
						<div class="am-u-sm-9">
							<input type="text" name="site_logo" value="{$setting[ 'site_logo']}" placeholder="{$_L.SITE_LOGO}">
						</div>
					</div>

					<div class="am-form-group">
						<label for="user-intro" class="am-u-sm-3 am-form-label">{$_L.WAP_SUPPORT}</label>
						<div class="am-u-sm-9">
							<div class="am-btn-group" data-am-button="">
								<label class="am-btn am-btn-default am-btn-xs  {if $setting.wap_support}{if $setting.wap_support eq 0} am-active{else}{/if}{else} am-active{/if}">
									<input type="radio" name="wap_support" value="0" {if $setting.wap_support}{if $setting.wap_support eq 0} checked="checked" {else}{/if}{else} checked="checked" {/if} id="option1"> {$_L.CLOSE}
								</label>
								<label class="am-btn am-btn-default am-btn-xs  {if $setting.wap_support eq 1}am-active{else}{/if}">
									<input type="radio" name="wap_support" {if $setting.wap_support eq 1} checked="checked" {else}{/if} value="1" id="option2">{$_L.OPEN}
								</label>
							</div>
						</div>
					</div>

					<div class="am-form-group">
						<label for="user-intro" class="am-u-sm-3 am-form-label">{$_L.HOME_TPL}</label>
						<div class="am-u-sm-9">
							<div class="am-btn-group" data-am-button="">
								 {foreach from=$tpl_list item=tpl}
								<label class="am-btn am-btn-default am-btn-xs {if $setting.home_tpl eq $tpl}am-active{else}{/if} ">
									<input type="radio" name="home_tpl" {if $setting.home_tpl eq $tpl}checked="checked"{else}{/if} value="{$tpl}" id="option1"> {$tpl}
								</label>
								{/foreach}
							</div>
						</div>
					</div>
					<div class="am-form-group">
						<div class="am-u-sm-9 am-u-sm-push-3">
							<button type="button" class="am-btn am-btn-primary hy-js-submit">{$_L.SAVE}</button>
						</div>
					</div>
				</form>
			</div>
		</div>
		{include file='../Common/hy_footer.html'}
		<script type="text/javascript">
			$(function(){
				$('.hy-js-submit').click(function(e){
					var data={};
						e.preventDefault();
						var data_arr=$('.am-form').serialize().replace('+',' ').split('&');
						for(var i=0;i<data_arr.length;i++)
						{
							var temp=data_arr[i].split('=');
							data[temp[0]]=hungry.util.utf8_decode(temp[1]);
						}
					 $.post('index.php?g=admin&m=sys&a=saveSetting',data,function(result){
                        alert(result);					 	
					 	
					 },'text')
					
				})
				
			})
		</script>
	</body>

</html>